<?php
/**
 * Created by 项目.
 * User: xuguopeng
 * Date: 2020-06-23
 * Time: 16:08
 */

namespace app\api\model;


use think\model\concern\SoftDelete;

class StoreOrder extends BaseModel
{
    use SoftDelete;

    public function getPayTimeAttr($value)
    {
        if($value) {
            return date('Y-m-d H:i:s',$value);
        } else {
            return '';
        }
    }

    // 关联
    public function clean()
    {
        return $this->hasMany('StoreOrderClean','store_order_id','id')->order('id asc');
    }
}